package com.ruoyi.charge.auth.utils;

import java.util.HashSet;
import java.util.Set;

public class ReleaseUrlUtil {

    /**
     * 放行的url
     */
    public static Set<String> releaseUrls = new HashSet<>();

    static {
        releaseUrls.add("/auth/login");
        releaseUrls.add("/auth/refresh/token");
        releaseUrls.add("/auth/register");
        releaseUrls.add("/charge/banner");
        releaseUrls.add("/charge/store");
        releaseUrls.add("/charge/equipment");
        releaseUrls.add("/charge/record");
        releaseUrls.add("/charge/pay/wx/createOrder");
        releaseUrls.add("/charge/pay/wx/notify/order");
        releaseUrls.add("/charge/pay/wx/test/chargeStr");
        releaseUrls.add("/charge/price/list");
        releaseUrls.add("/charge/wxuser/get/charge/str_code");
    }


    public static Boolean checkReleaseUrl(String url) {
        for (String str : releaseUrls) {
            if (url.contains(str)) {
                return true;
            }
        }
        return false;
    }
}
